from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()

class students(db.Model):
    uuid = db.Column(db.Text, primary_key=True, unique=True)
    xuehao = db.Column(db.Text,unique = True ,nullable=False)
    name = db.Column(db.Text, nullable=False)
    # 0-女，1-男
    sex = db.Column(db.Integer, nullable=True)
    birthday = db.Column(db.DateTime, nullable=True)
    classid = db.Column(db.Integer, nullable=False)
    sfz = db.Column(db.Text, nullable=False)
    minzu = db.Column(db.Text, nullable=True)
    # 是否允许登录((0, '在读'), (1, '毕业'))
    status = db.Column(db.Integer, nullable=False, default=0)
    remark = db.Column(db.Text, nullable=True)
    create_time = db.Column(db.DateTime, nullable=False)